## Add the AMO namespace
$loadInfo = [Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices")

## Connect and get the edition of the local server
$connection = "localhost"
$server = New-Object Microsoft.AnalysisServices.Server
$server.connect($connection)
Write-Output ("`n`nServer: {0}`nEdition: {1}`nBuild: {2}`n`n" -f 
    $server.Name, $server.Edition, $server.Version) 
